home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / C / CRACKLIB.ZIP / CRACKLIB.TAR / cracklib25_small / cracklib / packer.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-07-09  |  1.2 KB  |  59 lines

  1. /*
  2.  * This program is copyright Alec Muffett 1993. The author disclaims all 
  3.  * responsibility or liability with respect to it's usage or its effect 
  4.  * upon hardware or computer systems, and maintains copyright as set out 
  5.  * in the "LICENCE" document which accompanies distributions of Crack v4.0 
  6.  * and upwards.
  7.  */
  8.  
  9. #include <stdio.h>
  10.  
  11. #define STRINGSIZE    256
  12.  
  13. typedef unsigned char int8;
  14. typedef unsigned short int int16;
  15. typedef unsigned long int int32;
  16. #ifndef NUMWORDS
  17. #define NUMWORDS     16
  18. #endif
  19. #define MAXWORDLEN    32
  20. #define MAXBLOCKLEN     (MAXWORDLEN * NUMWORDS)
  21.  
  22. struct pi_header
  23. {
  24.     int32 pih_magic;
  25.     int32 pih_numwords;
  26.     int16 pih_blocklen;
  27.     int16 pih_pad;
  28. };
  29.  
  30. typedef struct
  31. {
  32.     FILE *ifp;
  33.     FILE *dfp;
  34.     FILE *wfp;
  35.  
  36.     int32 flags;
  37. #define PFOR_WRITE    0x0001
  38. #define PFOR_FLUSH    0x0002
  39. #define PFOR_USEHWMS    0x0004
  40.  
  41.     int32 hwms[256];
  42.  
  43.     struct pi_header header;
  44.  
  45.     int count;
  46.     char data[NUMWORDS][MAXWORDLEN];
  47. } PWDICT;
  48.  
  49. #define PW_WORDS(x) ((x)->header.pih_numwords)
  50. #define PIH_MAGIC 0x70775631
  51.  
  52. extern PWDICT *PWOpen();
  53. extern char *Mangle();
  54. extern char *FascistCheck();
  55.  
  56. #define CRACK_TOLOWER(a)     (isupper(a)?tolower(a):(a)) 
  57. #define CRACK_TOUPPER(a)     (islower(a)?toupper(a):(a)) 
  58. #define STRCMP(a,b)        strcmp((a),(b))
  59.